﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;

namespace LuoYi.Admin.Entities;

/// <summary>
/// 岗位信息表
/// </summary>
[Table("sys_post")]
public class SysPost : IEntity
{
    /// <summary>
    /// 岗位ID
    /// </summary>
    [Key]
    [Column("post_id", TypeName = "bigint(20)")]
    public long PostId { get; set; }

    /// <summary>
    /// 岗位编码
    /// </summary>
    [Column("post_code")]
    [StringLength(64)]
    public string PostCode { get; set; } = null!;

    /// <summary>
    /// 岗位名称
    /// </summary>
    [Column("post_name")]
    [StringLength(50)]
    public string PostName { get; set; } = null!;

    /// <summary>
    /// 显示顺序
    /// </summary>
    [Column("post_sort", TypeName = "int(4)")]
    public int PostSort { get; set; }

    /// <summary>
    /// 状态（0正常 1停用）
    /// </summary>
    [Column("status")]
    [StringLength(1)]
    public string Status { get; set; } = null!;

    /// <summary>
    /// 创建者
    /// </summary>
    [Column("create_by")]
    [StringLength(64)]
    public string? CreateBy { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Column("create_time", TypeName = "datetime")]
    public DateTime? CreateTime { get; set; }

    /// <summary>
    /// 更新者
    /// </summary>
    [Column("update_by")]
    [StringLength(64)]
    public string? UpdateBy { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    [Column("update_time", TypeName = "datetime")]
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [Column("remark")]
    [StringLength(500)]
    public string? Remark { get; set; }
}
